package com.dq.controller.app.user;

import com.dq.domain.sys.user.user.centre.UserSummary;
import com.dq.exception.customException.AdminException;
import com.dq.service.AllService;
import com.dq.vo.Vo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

/**
 * @Author luchangtong
 * @Date 2020/4/10 14:06
 */
@RestController
@RequestMapping("/app/userSummary/")
@Api(description = "工作汇报管理")
public class AppUserSummaryController extends AllService {

    @PostMapping("save")
    @ApiOperation("保存,所属门店后台自动获取")
    public Vo save(@RequestBody UserSummary userSummary) throws AdminException{

        return userSummaryService.save(userSummary);
    }

    @GetMapping("list/{staffUserId}")
    @ApiOperation("工作计划")
    public Vo list(@PathVariable Long staffUserId) throws AdminException{
        return userSummaryService.list(staffUserId);
    }
}
